<template>
  <q-layout
    view="hHh Lpr lff"
    :style="{
      backgroundImage: 'url(images/bg_index.png)',
      backgroundSize: 'cover',
      minWidth: '1600px',
    }"
  >
    <q-page-container>
      <router-view />
    </q-page-container>
  </q-layout>
</template>

<script lang="ts">
import { useMeta } from 'quasar';
import { computed, defineComponent, ref, watchEffect } from 'vue';
import { useRoute } from 'vue-router';

import { pathModule } from './path-module';

export default defineComponent({
  setup() {
    const route = useRoute();

    const moduleName = ref('');
    watchEffect(() => {
      moduleName.value = pathModule[route.path];
    });

    const meta = computed(() => ({ title: `${moduleName.value}` }));
    useMeta(() => meta.value);

    return { moduleName };
  },
});
</script>
